package com.probiz.estore.product;

import java.util.HashMap;
import java.util.Map;

public class ProductConstants {
	
	public static final short BULKEDIT_KIND_MODIFY = 1; //直接修改 
	public static final short BULKEDIT_KIND_ADD = 2; //增加 
	public static final short BULKEDIT_KIND_REPLACE = 3; //查找并替换 
	public static final short BULKEDIT_KIND_FORMULA  = 4; //公式修改 
	
	public static final short PRICE_METHOD_OPERATOR_ADD  = 1; //公式修改 操作子  加法
	public static final short PRICE_METHOD_OPERATOR_SUB  = 2; //公式修改 操作子  减法
	public static final short PRICE_METHOD_OPERATOR_PLS  = 3; //公式修改 操作子  乘法
	
	/**
	 * 永远只会见到两个价
	 * 1.市场价、售价
	 * 2.售价、特价
	 * 3.售价、折扣价
	 * 4.售价、售价
	 * 
	 * 前面一个价是去掉的状态，后面一个价才是真实的价
	 */
	public static final short PRICE_VIEW_TYPE_1  = 1; //市场价、售价
	public static final short PRICE_VIEW_TYPE_2  = 2; //售价、特价
	public static final short PRICE_VIEW_TYPE_3  = 3; //售价、折扣价
	public static final short PRICE_VIEW_TYPE_4  = 4; //售价、售价
	public static final short PRICE_VIEW_TYPE_5  = 5; //原价、捆绑售价
	/**
	 * u8 目录编码子父编码长度查找表，
	 * key为子目录编码长度，value为父目录编码长度
	 * 通过子目录编码长度获得父目录编码长度
	 */
	public static final Map<Integer,Integer> EAI_CODE_RULE = new HashMap<Integer,Integer>();
	static{
		EAI_CODE_RULE.put(Integer.valueOf(2), Integer.valueOf(0));
		EAI_CODE_RULE.put(Integer.valueOf(4), Integer.valueOf(2));
		EAI_CODE_RULE.put(Integer.valueOf(6), Integer.valueOf(4));
		EAI_CODE_RULE.put(Integer.valueOf(8), Integer.valueOf(6));
		EAI_CODE_RULE.put(Integer.valueOf(11), Integer.valueOf(8));
	}
	
	public static  final String VIEW_PRODUCT_ID_LIST = "VIEW_PRODUCT_ID_LIST";
}
